using System.Web.Mvc;
using Web.HelperClasses.Inflexion;

namespace Web.HelperClasses
{
	public class InflectorActionFilterAttribute : ActionFilterAttribute
	{
		public override void OnActionExecuted(ActionExecutedContext filterContext)
		{
			var viewResult = filterContext.Result as ViewResult;
			if (viewResult != null)
				viewResult.ViewBag.Inflector = Inflector;
		}

		public IInflector Inflector { get; set; }
	}
}